1. Field of the Invention
The present invention relates to an image encoding system in a facsimile apparatus or an image filing apparatus as an image communication apparatus.
2. Related Background Art
As a conventional image encoding system, a run length encoding system represented by the G3 or G4 facsimile which is recommended by CCITT (International Telegraph and Telephone Consultative Committee) is generally used. According to such an encoding system, a length (run length) in which all white pixels or all black pixels continue is counted and a code corresponding to its count value is determined from a prepared code table. The code table which is used in such a system is characterized by the feature that a relatively short code is assigned to a long white run which is frequently seen in a document image. Therefore, in the case where the statistical characteristics of the run length differ from those of the image which was used as a reference in the making of the code table, for instance, in the case of encoding a pseudo half tone image in which white and black pixels frequently alternate, there is a problem that the amount of information required to express the codes exceeds the amount of original data.
Therefore, as an encoding method in which encoding can be also efficiently executed even for the above-described image such that an inconvnience occurs with encoding based as described above on run length, an encoding method whereby a Markovian model code such as an arithmetic code or the like is used has been proposed.
The conventional well-known arithmetic code is based on a method whereby a code is formed by an arithmetic operation so that an input signal train is set to a code which is expressed by a binary decimal fraction. The above method has been published by the literature by Langdon, Rissanen, et al., "Compression of Black/White Images with Arithmetic Coding," IEEE Transaction Com., COM-29, 6, June 1981, and the like. According to the literature, assuming that an input signal train which has already been encoded is set to S, a probability with which a less probable symbol (LPS) appears is set to q, an augend of the arithmetic register is set to A(S), and a code register is set to C(S), the following arithmetic operations are executed for every input signal. EQU A(S.sub.1)=A(S).times.q.perspectiveto.a(S).times.2.sup.-Q ( 1) EQU A(S.sub.0)=&lt;A(s)-A(S.sub.1)&gt;.sub.l ( 2)
&lt;&gt;.sub.l denotes the cutting at an effective number of digits, i.e., l bits. EQU C(S.sub.0)=C(S) (3) EQU C(S.sub.1)=C(S)+A(S.sub.o) (4)
In the case where the encoding data is a most probable symbol (MPS: 0 in the above example), A(S.sub.0) and C(S.sub.0) are used to encode the next data. On the other hand, if the encoding data is a less probable symbol (LPS: 1 in the above example), A(S.sub.1) and C(S.sub.1) are used to encode the next data.
The new value of A is increased by 2.sup.S times (S is an integer equal to 0 or more) and is set to a value within a range of 0.5.ltoreq.A&lt;1.0. The above process corresponds to the content of the arithmetic register A being shifted S times in the hardware. The code register C is also shifted to the left the same number of times and the signal which was shifted out is set to a code. By repeating the above processes, the codes are formed.
On the other hand, as shown by equation (1), by approximating the appearance probability q of the LPS by the power of 2 (2.sup.-Q : Q is a positive integer), multiplication is replaced by a shift arithmetic operation. To further improve such an approximation, there has been proposed a method whereby q is approximated by, for instance, a polynomial in powers of 2 as shown by equation (5). The worst efficiency point is improved by the above approximation. EQU q.perspectiveto.2.sup.-Q1 +2.sup.-Q2 ( 5)
However, in the above arithmetic encoding, the appearance probability which was approximated by the powers of 2 is fixed and it may happen that the encoding is not efficiently executed for an image of different appearance probability.
Therefore, there has been proposed a method whereby the appearance probability q of the LPS is changed in accordance with the feature of the image to be encoded and efficient encoding suitable to an image is performed. As such a probability estimating method, there have been known a static method of unconditionally deciding a probability in accordance with the status of a pixel which has already been encoded and a dynamic method of estimating the probability while encoding.
In the case where the appearance probability q of the LPS was approximated by the polynomial in powers of 2, the value of the appearance probability q is a discontinuous value. A condition, a timing, and the like to change a certain appearance probability to another appearance probability are large factors in accomplishing the optimum encoding.
On the other hand, as mentioned above, in a facsimile apparatus as a typical example of a conventional image communication apparatus, an MH code, an MR code, or the like is used as a system for encoding black/white binary data. On the other hand, in recent years, the development of a cheap color printer has progressed and there has been proposed an image communication of a color image, particularly, a binary color image having data of red (R), green (G), and blue (B) each consisting of one bit or data of yellow (Y), cyan (C), and magenta (M) each consisting of one bit.
As such an encoding system of a binary color image, there has been considered a method whereby three colors are encoded for every bit plane and the MH or MR coding system for black/white data is used.
However, according to the method of encoding three colors for every bit plane, there is the problem that by encoding three colors for every bit plane of R, G, and B, the entropies of the original RGB information sources are increased, so that the encoding efficiency is deteriorated. This typically results in the color correlation information not being used.